<?
  include("com/website_config.php");
  $pathurltrue=__FILE__;
  $pathurl=basename($pathurltrue,".php");
  	$PageSize = 12 ;             //每页显示记录数
	$StartRow = 0;             //指针在数据库的初始位置
						   //获取需要显示的页数，由用户提交
	$getpage=(int)$_GET['PageNo'];
	if(empty($getpage)){        //如果为空，则表示第1页
	if($StartRow == 0){
	$PageNo = $StartRow + 1;    //设定为1
	}
	}else{
	$PageNo = (int)$_GET['PageNo'];         //获得用户提交的页数
	$StartRow = ($PageNo - 1) * $PageSize;  //获得开始显示的记录编号
	}
	
	if($PageNo % $PageSize == 0){
	$CounterStart = $PageNo - ($PageSize - 1);
	}else{
	$CounterStart = $PageNo - ($PageNo % $PageSize) + 1;
	}
	//显示页码的最大值
	$CounterEnd = $CounterStart + ($PageSize - 1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>服务范围-<? echo $title;?></title>
<link rel="shortcut icon" href="/favicon.ico"/>
<link href="css/css.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.ashlybus.com/js/jquery-1.9.1.min.js"></script>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?429d331d02551c5c42fbfb2982cfcf64"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>

<body>
<? include("top.php");?>

<div class="jiange"></div>
<div class="nowplace">当前位置：<span><a href="/">首页</a></span><span>&nbsp;>&nbsp;</span><span><a href="search.php">服务范围</a></span></div>

<div class="jiange"></div>
<div class="warp"><!--服务范围-->
     <div class="pubtit"><span>服务范围</span></div>
     <div class="fuwufanwei">
     	<ul>
            <li><a href="service.php"><div class="div1"><img src="images/lvyou.png" /></div><div class="div2">旅游租车</div></a></li>
            <li><a href="service.php"><div class="div1"><img src="images/huiyi.png" /></div><div class="div2">会议接送</div></a></li>
            <li><a href="service.php"><div class="div1"><img src="images/shangwu.png" /></div><div class="div2">商务接待</div></a></li>
            <li><a href="hqzc.php"><div class="div1"><img src="images/hunqing.png" /></div><div class="div2">婚庆租车</div></a></li>
            <li><a href="service.php"><div class="div1"><img src="images/jichang.png" /></div><div class="div2">机场接送</div></a></li>
            <li><a href="service.php"><div class="div1"><img src="images/tuanti.png" /></div><div class="div2">团体租车</div></a></li>
            <li><a href="service.php"><div class="div1"><img src="images/banche.png" /></div><div class="div2">企业班车</div></a></li>
        </ul>
        <div class="cl"></div>
     </div>
</div>

<div class="jiange"></div>
<div class="warp">
     <div class="liuchengbox">
          <ul>
              <li>
                 <div class="lc1 fl"><img src="images/1.jpg" /></div> 
                 <div class="lc2 fl">
                     <p class="lctit">选择车辆</p>
                     <p class="lctext">用户根据需求在网站选择合适车辆</p>
                </div>
              </li>
              <li>
                 <div class="lc1 fl"><img src="images/2.jpg" /></div> 
                 <div class="lc2 fl">
                     <p class="lctit">咨询报价</p>
                     <p class="lctext">根据客户要求，确认租车费用</p>
                </div> 
              </li>
              <li>
                 <div class="lc1 fl"><img src="images/3.jpg" /></div> 
                 <div class="lc2 fl">
                     <p class="lctit">提交订单</p>
                     <p class="lctext">签订《租车协议书》，传真：025-58836185<br />
                     </p>
                </div> 
              </li>
              <li>
                 <div class="lc1 fl"><img src="images/4.jpg" /></div> 
                 <div class="lc2 fl">
                     <p class="lctit">支付车款</p>
                     <p class="lctext">调度员确认费用，安排车辆及司机</p>
                </div> 
              </li>
              <li>
                 <div class="lc1 fl"><img src="images/5.jpg" /></div> 
                 <div class="lc2 fl">
                     <p class="lctit">评价服务</p>
                     <p class="lctext">用车结束填写满意度调查表</p>
                </div> 
              </li>
          </ul>
          <div class="cl"></div>
     </div>    
</div>

<div class="jiange"></div>
<div class="warp">
     <div class="search">
          <div class="search_box"> </div>
          <div class="search_box" style="border:none; padding-top:15px;">
               <table cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td width="160" align="center"><span class="name">车辆车型</span></td>
                         <td>
                             <ul class="carselect2">
                                 <li><p><input type="checkbox" onclick="ysqxs('search.php');"/>全部</p></li>
								 <?
				$sql="select * from ms_protype where pid=1 order by type_bianma desc";
				$onpage_cl = $db->query($sql);
				$rs=mysql_num_rows($onpage_cl);
				if($rs==""){
						echo"<center>".'暂时还没有信息!'."</center>";					
				}
				else
				{
				while($array=mysql_fetch_array($onpage_cl))
				{
				$onepageid=(int)$_GET['typeid'];
				$nowID=(int)$array['type_id'];
			?>
                                 <li><p><input type="checkbox" onclick="ysqxs('search.php?typeid=<? echo $array['type_id'];?>');"/><? echo $array['type_name'];?></p></li>
								 <?
				}
			}
		   ?>
                             </ul>
				<script>
               
               function ysqxs(vars){
                  //alert(vars);
                  window.location.href = vars;
               }
            </script>
                         </td>
                     </tr>
               </table>
          </div>
     </div>
</div>

<div class="jiange"></div>
<div class="warp">
  <div class="carlist">
    <ul>
      <?				
					$typeid_array=(int)$_GET['typeid'];
								
					global $record;
					global $TRecord;
					
					$db = new DataAccess();
					$db->connect();
					if($typeid_array!=""){
						$query = "select * from ms_product where pro_tid=$typeid_array order by pro_px desc";
						$query2 = "select * from ms_product where pro_tid=$typeid_array order by pro_px desc LIMIT $StartRow,$PageSize";
					}else{
						$sql="select * from ms_protype where pid=1";
						$onpage_cl = $db->query($sql);
						$rs=mysql_num_rows($onpage_cl);
						while($array=mysql_fetch_array($onpage_cl)){
							$a[]=(int)$array['type_id'];
							$have_str = implode(',',$a);//转成字符串序列
						}
							//print_r($array);
							$query = "select * from ms_product where pro_tid in ($have_str) order by pro_px desc";
							$query2 = "select * from ms_product where pro_tid in ($have_str) order by pro_px desc LIMIT $StartRow,$PageSize";
						
					}
					$TRecord = $db->query($query);
					$record = $db->query($query2);
				
				$rs1=mysql_num_rows($TRecord);
				if($rs1==""){
						echo"<p align=center>".'暂时还没有信息!'."</p>";
				}
				else
				{
					//获取总记录数
					$RecordCount = mysql_num_rows($TRecord);
					//获取总页数
					$MaxPage = $RecordCount % $PageSize;
					if($RecordCount % $PageSize == 0){
						$MaxPage = $RecordCount / $PageSize;
					}
					else{
					}          
					$MaxPage = ceil($RecordCount / $PageSize);
					
					$i = 1;
					while($array=mysql_fetch_array($record))
						{
						  $bil = $i + ($PageNo-1)*$PageSize;	  
				?>
      <li>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
          <tr>
            <td width="310" align="center"><?
		  //从相册中查询出一个图片
		  $pro_id=$array['pro_id'];
		  $photoSQL="select * from ms_product_photo where pro_id=$pro_id limit 1";
		  $rs=$db->query($photoSQL);
		  $photoArray=mysql_fetch_array($rs);
		  
		   $pro_pic=$photoArray["img_path"];
		   $proimgpath=str_replace("../../","","$pro_pic");//图片路径重置

		   if(!file_exists($proimgpath)){//图片不存在
			echo "<img src='images/nopic.jpg' border='0' width='220' height='158' />";							
		   }else{
		?>
                <span> <a href="search_details.php?typeid=<? echo $typeid;?>&amp;detail_id=<? echo $array['pro_id']; ?>"><img src="<? echo $proimgpath; ?>" width="260" height="174" /></a> </span>
                <? 
		 }
		?><br />
				<div style="color:#0099FF; width:210px; height:25px; text-align:center">点击图片查看车辆详情</div>
            </td>
            <td valign="top"><div class="carname"><? echo $array["pro_title"]; ?></div>
                <div class="div01_qq"><span>客服QQ：<a style="cursor:pointer;" target="blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=310634955&amp;site=安昇&amp;Menu=yes" title="点击QQ咨询">310634955</a></span><span><a style="cursor:pointer;" target="blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=310634955&amp;site=安昇&amp;Menu=yes" title="点击QQ咨询"><img src="images/qq.jpg" /></a></span></div>
              <div class="div03">
              <?
				$placeTel=$_COOKIE["placeTel"];
				$str=$array["pro_content"];
				$str=str_replace("18120116637",$placeTel,$str);
				echo $str;
				 ?>
              </div></td>
            <td width="160"><p class="liuyan"><a href="guestbook.php">留言</a></p></td>
          </tr>
        </table>
      </li>
      <? 
					  $i++;
					}
?>
    </ul>
  </div>
  <div class="page">
    <? 
	if($MaxPage>1){
	include ('com/page_search.php');
	}else{
	}
	?>
  </div>
  <? 
		}
	?>
</div>
<? include("foot.php");?>
</body>
</html>
